package edu.ptu.shortlink.admin.common.convention.exception;

import edu.ptu.shortlink.admin.common.convention.errorcode.BaseErrorCode;
import edu.ptu.shortlink.admin.common.convention.errorcode.IErrorCode;

/**
 * @BelongsProject: shortlink
 * @BelongsPackage: edu.ptu.shortlink.admin.common.convention.exception
 * @Author: HYJ
 * @CreateTime: 2025-04-23  17:45
 * @Description: 远程调用异常
 * @Version: 1.0
 */
public class RemoteException extends AbstractException {

    public RemoteException(String message) {
        this(message, null, BaseErrorCode.REMOTE_ERROR);
    }

    public RemoteException(String message, IErrorCode errorCode) {
        this(message, null, errorCode);
    }

    public RemoteException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "RemoteException{" +
                "errorCode='" + errorCode + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
